using System;
using System.Collections.Generic;
using System.Text;

namespace MindFair.HomeLeague.Bowling
{
    public class Bowler
    {
        public Bowler(string firstName, string lastName, string nickName)
        {
            this.FirstName = firstName;
            this.LastName = lastName;
            this.NickName = nickName;
        }

        private string _firstName;
        public string FirstName
        {
            get { return _firstName; }
            set
            {
                if (value == null)
                    throw new ArgumentNullException("value", "A Bowler's first name can not be 'null'.");
                _firstName = value;
            }
        }
        private string _lastName;
        public string LastName
        {
            get { return _lastName; }
            set
            {
                if (value == null)
                    throw new ArgumentNullException("value", "A Bowler's last name can not be 'null'.");
                _lastName = value;
            }
        }
        private string _nickName;
        public string NickName
        {
            get { return _nickName; }
            set
            {
                if (value == null)
                    throw new ArgumentNullException("value", "A Bowler's nickname can not be 'null'.");
                _nickName = value;
            }
        }
        public string FullName
        {
            get
            {
                return string.Format("{0} \"{1}\" {2}",
                    this.FirstName, this.NickName, this.LastName);
            }
        }
        public override string ToString()
        {
            return this.FullName;
        }
    }
}
